package cn.iocoder.an.module.mold.controller.admin.drawingno.vo;

import cn.iocoder.an.module.mold.controller.admin.account.vo.AccountRespVO;
import cn.iocoder.an.module.mold.dal.dataobject.account.AccountDO;
import cn.iocoder.an.module.mold.dal.dataobject.category.CategoryDO;
import cn.iocoder.an.module.mold.dal.dataobject.recheckcategory.RecheckCategoryDO;
import cn.iocoder.an.module.mold.dal.dataobject.storage.StorageDO;
import cn.iocoder.an.module.mold.dal.dataobject.upkeepcategory.UpkeepCategoryDO;
import cn.iocoder.an.module.mold.dal.dataobject.warehouse.WarehouseDO;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.time.LocalDateTime;
import java.util.List;

import com.fhs.core.trans.vo.VO;
import cn.idev.excel.annotation.*;
import cn.iocoder.an.framework.excel.core.annotations.DictFormat;
import cn.iocoder.an.framework.excel.core.convert.DictConvert;

@Schema(description = "管理后台 - 模具图号 Response VO")
@Data
@ExcelIgnoreUnannotated
public class DrawingNoRespVO implements VO {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "19886")
    @ExcelProperty("主键")
    private Long id;

    @Schema(description = "图号", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("图号")
    private String drawingNo;

    @Schema(description = "客户名")
    @ExcelProperty("客户名")
    private String customer;

    @Schema(description = "模具类型id", requiredMode = Schema.RequiredMode.REQUIRED, example = "7480")
    @Trans(type = TransType.SIMPLE, target = CategoryDO.class, fields = "name", ref = "categoryName")
    private Long categoryId;

    @Schema(description = "模具类型")
    @ExcelProperty("模具类型")
    private String categoryName;

    @Schema(description = "保养类型id", example = "25892")
    @Trans(type = TransType.SIMPLE, target = UpkeepCategoryDO.class, fields = "name", ref = "upkeepName")
    private Long upkeepId;

    @Schema(description = "保养类型")
    @ExcelProperty("保养类型")
    private String upkeepName;

    @Schema(description = "复检类型id", example = "18494")
    @Trans(type = TransType.SIMPLE, target = RecheckCategoryDO.class, fields = "name", ref = "recheckName")
    private Long recheckId;

    @Schema(description = "复检类型")
    @ExcelProperty("复检类型")
    private String recheckName;

    @Schema(description = "寿命扣减方式id", requiredMode = Schema.RequiredMode.REQUIRED, example = "22631")
    @ExcelProperty("寿命扣减方式id")
    private Long lifeDeductionId;

    @Schema(description = "库存状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty(value = "库存状态", converter = DictConvert.class)
    @DictFormat("mold_inventory_status") //
    private Integer inventoryStatus;

    @Schema(description = "仓库id", example = "1231231")
    @Trans(type = TransType.SIMPLE, target = WarehouseDO.class, fields = "name", ref = "warehouseName")
    private Long warehouseId;

    @Schema(description = "仓库")
    @ExcelProperty("仓库")
    private String warehouseName;


    @Schema(description = "储位id", example = "16719")
    @Trans(type = TransType.SIMPLE, target = StorageDO.class, fields = "name", ref = "storageName")
    private Long storageId;

    @Schema(description = "储位")
    @ExcelProperty("储位")
    private String storageName;

    @Schema(description = "设备Id", example = "15975")
    @Trans(type = TransType.SIMPLE, targetClassName = "cn.iocoder.an.module.business.dal.dataobject.equipmentmanage.EquipmentManageDO", fields = {"equipmentName","code","installPosition"}, refs = {"devName","devCode","devPosition"})
    private Long devId;

    @Schema(description = "设备名", example = "15975")
    @ExcelProperty("设备名")
    private String devName;

    @Schema(description = "设备编码", example = "15975")
    @ExcelProperty("设备编码")
    private String devCode;

    @Schema(description = "设备位置", example = "15975")
    @ExcelProperty("设备位置")
    private String devPosition;

    @Schema(description = "入库人员id", example = "10806")
    @Trans(type = TransType.SIMPLE, targetClassName = "cn.iocoder.an.module.system.dal.dataobject.user.AdminUserDO", fields = "nickname", ref = "warehouseInPersonName")
    private Long warehouseInPersonId;

    @Schema(description = "入库人员")
    @ExcelProperty("入库人员")
    private String warehouseInPersonName;

    @Schema(description = "入库时间")
    @ExcelProperty("入库时间")
    private LocalDateTime warehouseInTime;

    @Schema(description = "出库人员id", example = "16511")
    @Trans(type = TransType.SIMPLE, targetClassName = "cn.iocoder.an.module.system.dal.dataobject.user.AdminUserDO", fields = "nickname", ref = "warehouseOutPersonName")
    private Long warehouseOutPersonId;

    @Schema(description = "出库人员")
    @ExcelProperty("出库人员")
    private String warehouseOutPersonName;

    @Schema(description = "出库时间")
    @ExcelProperty("出库时间")
    private LocalDateTime warehouseOutTime;

    @Schema(description = "描述", example = "你猜")
    @ExcelProperty("描述")
    private String description;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "模具列表")
    private List<AccountRespVO> accounts;

}
